package com.loklok.code.confuse.model;

import com.loklok.code.confuse.util.ClassMetaDataTypeEnum;

import java.io.Serializable;
import java.util.Set;

public class ClassMetaData implements Serializable {

    private String fullClassName;

    private String className;

    private ClassMetaDataTypeEnum type;

    private String feignClientName;

    private Set<String> methodNames;

    public ClassMetaData() {
    }

    public ClassMetaData(String funClassName, String className, ClassMetaDataTypeEnum type, String feignClientName) {
        this.fullClassName = funClassName;
        this.className = className;
        this.type = type;
        this.feignClientName = feignClientName;
    }

    public boolean voType(){
        return type == ClassMetaDataTypeEnum.VO;
    }

    public boolean requestType(){
        return type == ClassMetaDataTypeEnum.REQUEST;
    }

    public boolean controllerType(){
        return type == ClassMetaDataTypeEnum.CONTROLLER;
    }

    public String getPartPckName(){
        return voType() ? "vo" : controllerType() ? "controller" : "request";
    }

    public String getFullClassName() {
        return fullClassName;
    }

    public void setFullClassName(String fullClassName) {
        this.fullClassName = fullClassName;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public ClassMetaDataTypeEnum getType() {
        return type;
    }

    public void setType(ClassMetaDataTypeEnum type) {
        this.type = type;
    }

    public String getFeignClientName() {
        return feignClientName;
    }

    public void setFeignClientName(String feignClientName) {
        this.feignClientName = feignClientName;
    }

    public Set<String> getMethodNames() {
        return methodNames;
    }

    public void setMethodNames(Set<String> methodNames) {
        this.methodNames = methodNames;
    }
}
